//
//  ViewController.m
//  tableView动画
//
//  Created by 王学志 on 2017/8/5.
//  Copyright © 2017年 王学志. All rights reserved.
//

#import "ViewController.h"
#import "ShowViewController.h"
@interface ViewController ()
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self setUpButton];
}

- (void) setUpButton {
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(100, 200, 60, 60);
    button.backgroundColor = [UIColor redColor];
    [button addTarget:self action:@selector(pushNextPage:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

- (void)pushNextPage:(UIButton *)sender {
    ShowViewController *show = [[ShowViewController alloc]init];
    [self.navigationController pushViewController:show animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
